package com.github.zzay.admin.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.Hidden;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

/**
 * @author zzay
 * @className Admin
 * @description Entity class of Admin users.
 * @create 2022/07/04 21:38
 */
@Data
@NoArgsConstructor
@TableName(value = "care_admin")
@Schema(name = "Admin", description = "管理员实体")
public class Admin implements Serializable {

    private static final long serialVersionUID = -9003980862087222525L;

    /**
     * Identifier.
     */
    @TableId(type = IdType.AUTO)
    @Schema(name = "id", description = "唯一标识符")
    private Integer id;

    /**
     * Username.
     */
    @Schema(name = "username", description = "用户名")
    private String username;

    /**
     * Password.
     */
    @Schema(name = "password", description = "密码")
    private String password;

    /**
     * Logo address.
     */
    @Schema(name = "logo", description = "头像图像地址")
    private String logo;

    /**
     * Real name.
     */
    @Schema(name = "real name", description = "真实姓名")
    private String realName;

    /**
     * Sex (Male: 0 / Female: 1 / Unknown: 2).
     */
    @Schema(name = "sex", description = "性别（0：男，1：女，2：未知）")
    private String sex;

    /**
     * Email address.
     */
    @Schema(name = "email", description = "邮箱")
    private String email;

    /**
     * Phone number.
     */
    @Schema(name = "phone", description = "手机号")
    private String phone;

    /**
     * Account status (normal: 0 / abandoned: 1)
     */
    @Schema(name = "status", description = "账号状态（0正常 1停用）")
    private String status;

    /**
     * Creator.
     */
    @Hidden
    @Schema(name = "createBy", description = "创建人")
    private Long createBy;

    /**
     * Created time.
     */
    @Hidden
    @Schema(name = "createTime", description = "创建时间")
    private Date createTime;

    /**
     * Updater.
     */
    @Hidden
    @Schema(name = "updateBy", description = "更新人")
    private Long updateBy;

    /**
     * Updated time.
     */
    @Hidden
    @Schema(name = "updateTime", description = "更新时间")
    private Date updateTime;

    /**
     * Delete flag (not deleted: 0 / deleted: 1).
     */
    @Hidden
    @Schema(name = "delFlag", description = "删除标志（0代表未删除，1代表已删除）")
    private Integer delFlag;

    public Admin(String username, String password) {
        this.username = username;
        this.password = password;
    }

}
